-
Notifications
You must be signed in to change notification settings - Fork 115
add validation when loosing focus #3657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
912424c to
aeb1205
Compare
|
I think the use of "Enter" is a pattern across Phoebus where any text input for the user is applied after and explicit "Enter" Coming to this PR. @kasemir what are your thoughts? |
|
We do want confirmation (via ENTER) in text entry fields and similar at runtime. In there, when you leave the text field (move out of focus), staying at the previous PV value is the safe thing to do. In comparison, running a motor to a half-typed position because somebody accidentally moved the mouse might shear somebody's arm off. In the editor, we already accept text when leaving the field for PV names or a Label text. So I'm OK with generally accepting text in the editor. Amazon accepts my credit card number when I leave the text field, so that's industry standard. Still, for the display runtime, we need confirmation. |
|
In this case when you press the enter key, the new configuration is not sent to kafka until you press the OK button of the dialog box. In my opinion, there is no risk to validate when you click somewhere else. as the ok button is the true validation. However, a lot of users at CEA are "Windows" users and do not use so much the keyboard but the mouse. If you type a long text in the edit and then you forget (or don't know you have to) to validate with the Enter key, then you loose all your text which can be a bit annoying, particularly if you also forget the second time... |
|
I was not able to reproduce the error @georgweiss noticed |





In the alarm configuration "Enter" key must be pressed to validate the text in the guidance, displays, commands and actions tables.
This way to validate could be annoying because if we forget to press the "Enter" key, all the text typed is lost.
This PR add another way to validation when the focus is lost.
It has been tested manually as it's a GUI change by @achoqt and @lcaouen
Issue related : #3656